package core;

import java.awt.BorderLayout;
import javax.swing.*;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Point;

public class Simulation extends JFrame{
    static String filename = "input.txt";    
    FactoryPanel factoryPanel = new FactoryPanel(this);   
    
    public Simulation(){               
        //ambil data
        Parser.parse(filename);                
        add(factoryPanel);    
        pack();
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        setTitle("Genetic Factory AI");
        setVisible(true);
        setResizable(true);
        setBackground(Color.BLACK);
    }
         
    public static void main (String[] args){        
        final Simulation it =  new Simulation();          
        
        //        Map.debugPrint();
//        PathFinding PF = new PathFinding(1);
//        PF.finding(Map.posPabrik, new Point(0,0));
//        PF.finding(new Point(4,0), new Point(6,6));

//        int arr[] = {1,2,3,3,3,5,1,1,1,5,1,4,4,4,4,2,2,2,2,2,2,2};
//        PF = new PathFinding(1);
//        PF.process(2, arr);
//        for(int i=0; i<PF.finalPath.size(); i++){
//            System.out.println("FINALPATH["+i+"] "+PF.finalPath.get(i).x+","+PF.finalPath.get(i).y);
//        }
        
//        for(int i=0; i<PF.timeMachine.length; i++){
//            System.out.println("Mesin "+PF.timeMachine[i].x+" time "+PF.timeMachine[i].y);
//        }
    }
}
